<?php
    $baseUrl = $this->base_url;
    $parameters = $this->parameters;
    $ads = $this->ads;
    foreach(($this->ads) as $result){
        switch ($result['type']){
            case 'picture':
                $result['picture'] = substr($result['picture'],1);
                $adContent = '<a href='.$result['url'].' target="_blank"><img src="'.$baseUrl.$result['picture'].'" alt=""  width="'.$result['width'].'" height="'.$result['height'].'"></img></a>';
                break;
            case 'animate':
                $adContent = $result['effect'].$result['introduction'];
                break;
            case 'flash':
                $result['flash'] = substr($result['flash'],1);
                $adContent = $result['flash'].$result['introduction'];
                break;
            case 'introduction':
                $adContent = '<marquee direction="left" scrollamount="5" onmouseover="this.stop()" onmouseout="this.start()" >'.				$result['introduction']                    .'</marquee>' ;
                break;
        }
        $html =$adContent;
        echo $html;
    }
?>